package priv.yiyuan.example.composite.file;

/**
 * 文件类
 * <p>
 * 组合模式-叶子节点
 *
 * @author YiYuan
 * @data 2025/8/29
 * @apoNote
 */
public class File extends DocumentComponent {

    private String content;

    public File(String name, String content) {
        super(name);
        this.content = content;
    }

    @Override
    public void display() {
        System.out.println("文件: " + name + ", 内容: " + content);
    }
}
